// package org.jeecg.supplier.controller;

package org.jeecg.modules.supplier.controller;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.jeecg.modules.supplier.Vo.SupplierQualificationVO;
import org.jeecg.modules.supplier.dto.SupplierQualificationSearchRequest;
import org.jeecg.modules.supplier.service.SupplierQualificationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
@RestController
@RequestMapping("/procurement/supplier/qualification")
@Api(tags = "供应商-资质联查接口")
public class SupplierQualificationController {

    @Autowired
    private SupplierQualificationService supplierQualificationService;

    @PostMapping("/list")
    @ApiOperation("联表查询供应商及资质信息")
    public List<SupplierQualificationVO> list(@RequestBody(required = false) SupplierQualificationSearchRequest query) {
        if (query == null) {
            query = new SupplierQualificationSearchRequest();
        }
        return supplierQualificationService.querySuppliersWithQualifications(query);
    }
}
